import { createApp } from "vue";
import { setupStore } from "./store";
import { router, setupRouter } from "./router";
import { registerGlobComps } from "./components";
import { setupRouterGuard } from "./router/guard";
import App from "./App.vue";
import "@unocss/reset/tailwind.css";
import "virtual:uno.css";

function bootstrap() {
  const app = createApp(App);

  setupStore(app);

  registerGlobComps(app);

  setupRouter(app);
  setupRouterGuard(router);

  // 修复白屏bug
  // setTimeout(() => {
  app.mount("#app");
  // }, 700);
}

bootstrap();
